package com.dcrzl.gazgmh.common.entity.sys;

import com.baomidou.mybatisplus.annotation.*;
import com.dcrzl.gazgmh.common.utils.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;


/**
 * @author dcrzl
 * @email 1728795786@qq.com
 * @date 2023-04-24 22:02:14
 */
@Data
@TableName("t_sys_user")
@Accessors(chain = true)
public class SysUser extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     *
     */
    @TableField(value = "role_id")
    private Long roleId;
    /**
     * 用户编码
     */
    @TableField(value = "user_code")
    private String userCode;
    /**
     *
     */
    @TableField(value = "mail")
    private String mail;
    /**
     *
     */
    @TableField(value = "username")
    private String username;
    /**
     *
     */
    @TableField(value = "true_name")
    private String trueName;
    /**
     *
     */
    @TableField(value = "password")
    private String password;
    /**
     *
     */
    @TableField(value = "phone")
    private String phone;
    /**
     * 上一次登录时间
     */
    @TableField(value = "login_time")
    private Date loginTime;
    @TableField(value = "password_expire_date")
    private Date passwordExpireDate;

    /**
     *
     */
    @TableField(value = "status", fill = FieldFill.INSERT)
    private Integer status;
    /**
     *
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     *
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private String roleName;

    @TableField(exist = false)
    private String newPassword;

}
